<?php

class Content_model extends CI_Model {
    
    function Content_model() {
        $this->load->library('api/services/Content');
    }
    
    function content_record_update($content_id, $column, $column_type, $value) {
        return Content::contentRecordUpdate($content_id, $column, $column_type, $value);
    }    
    
    function content_get($content_id) {
        $data = Content::contentGet($content_id);
        
        if(!empty($data)) return $data;
        else return false;
    }
    
    function content_set($menu_id, $member_id, $language_id, $name, $title, $content) {
        return Content::contentSet($menu_id, $member_id, $language_id, $name, $title, $content);
    }
    
//    function content_set($menu_id, $member_id, $name, $title, $content) {
//        return Content::contentSet($menu_id, $member_id, $name, $title, $content);
//    }
    
    function content_update($content_id, $menu_id, $member_id, $language_id, $name, $title, $content) {
        return Content::contentUpdate($content_id, $menu_id, $member_id, $language_id, $name, $title, $content);
    }
    
    function content_delete($content_id) {
        return Content::contentDelete($content_id);
    }
    
    function contents_list() {
        $data = Content::contentsList();
        
        if(!empty($data)) return $data;
        else return false;   
    }
    
    function contents_language_list($language_id) {
        $data = Content::contentsLanguageList($language_id);
        
        if(!empty($data)) return $data;
        else return false;   
    }    
    
    function content_menu_get($menu_id, $language_id) {
        $data = Content::contentMenuGet($menu_id, $language_id);
        
        if(!empty($data)) return $data;
        else return false;
    }    
    
}

?>